import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();

async function main() {
  //const 变量名=await prisma.数据库名.操作
  const result = await prisma.user.findUnique({
    where:{Email:"1@qq.com"},     //完整
    include:{post:true}
  })
  console.log(result); //打印
  //…您将在此处编写Prisma客户端查询
}

main()
  .then(async () => {
    await prisma.$disconnect();
  })
  .catch(async (e) => {
    console.error(e);
    await prisma.$disconnect();
    process.exit(1);
  });
 //运行 npx ts-node script.ts 查看结果
 //运行 npx prisma studio 以GUI形式查看结果